<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/res/commons/taglib.jsp" %>
<!DOCTYPE html>
<html>
<head>
  	<meta charset="utf-8">
  	<meta name="renderer" content="webkit">
  	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  	<link rel="stylesheet" href="${path}/res/layui/css/layui.css"  media="all">
	<link rel="shortcut icon" href="${path}/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="${path}/res/css/font.css">
    <link rel="stylesheet" href="${path}/res/css/xadmin.css">
    <script type="text/javascript" src="${path}/res/js/xadmin.js" charset="utf-8"></script>
</head>  
<body  class=" layui-fluid">
	<div class="x-body">
		<div class="layui-row">
	        <form class="layui-form layui-col-md12 x-so">
				<input class="layui-input" placeholder="上传开始日" name="starTime" id="start">
	          	<input class="layui-input" placeholder="上传截止日" name="endTime" id="end">
	          	<div class="layui-input-inline">
	            	<select name="pstatus">
	              		<option>所有商品</option>
	              		<option>上架中</option>
	              		<option>已下架</option>
	            	</select>
	          	</div>
	          	<input type="text" name="proTitle"  placeholder="请输入商品标题" autocomplete="off" class="layui-input">
	          	<button class="layui-btn"  lay-submit="" lay-filter="sreach" type="button"><i class="layui-icon">&#xe615;</i></button>
		        <button class="layui-btn layui-btn-danger" onclick="delAll()" type="button"><i class="layui-icon"></i>批量删除</button>
		        <button class="layui-btn" onclick="x_admin_show('添加用户','${path}/product/productaddpage.jhtml')" type="button"><i class="layui-icon"></i>添加</button>
		        <input type="hidden" name="pageIndex" value="${pageIndex}"/>
		        <input type="hidden" name="pageSize" value="${pageSize}"/>
			</form>
		</div>
		<table id="demo" lay-filter="test"></table>
	</div>
	<script type="text/html" id="barDemo">
  		<a class="layui-btn layui-btn-xs" lay-event="edit">查看</a>
  		<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
	</script>

<script type="text/javascript" src="${path}/res/layui/layui.js" charset="utf-8"></script>
<script>
layui.use('table', function(){
	var table = layui.table;
	  //第一个实例
	table.render({
		elem: '#demo'
	    ,height: 'full-20'
	    ,url: '${path}/product/getProductlist.jhtml' //数据接口
	    ,limits:[15,20,25,30]
	    ,limit:15
	    ,cols: [[ //表头
			{type:'checkbox'},
	      	{field: 'proTitle', title: '商品标题', width:380 }
	      	,{field:'proPrice', title:'商品原价', width:100, edit: 'text',sort: true}
	      	,{field:'proDiscountPrice', title:'商品售价', width:100, edit: 'text',sort: true}
	      	,{field:'proSellNum', title:'已售数量', width:100, edit: 'text',sort: true}
	      	,{field:'proColor', title:'颜色', width:200, edit: 'text'}
	      	,{field:'proSize', title:'尺码', width:150, edit: 'text'}
	      	,{field:'proEventEndTime', title:'结束时间', width:150, edit: 'text',sort: true}
	      	,{field:'proStatus', title:'商品状态', width:100, edit: 'text'}
	      	,{field:'bannerDesc', title:'按钮描述', width:150, edit: 'text'}
	      	,{fixed: 'right', title:'操作', toolbar: '#barDemo', width:150}
		]]
	    ,page: true //开启分页
	  });
	});
</script>

</body>
</html><%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/res/commons/taglib.jsp" %>
<!DOCTYPE html>
<html>
<head>
  	<meta charset="utf-8">
  	<meta name="renderer" content="webkit">
  	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  	<link rel="stylesheet" href="${path}/res/layui/css/layui.css"  media="all">
	<link rel="shortcut icon" href="${path}/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="${path}/res/css/font.css">
    <link rel="stylesheet" href="${path}/res/css/xadmin.css">
    <script type="text/javascript" src="${path}/res/js/xadmin.js" charset="utf-8"></script>
</head>  
<body  class=" layui-fluid">
	<div class="x-body">
		<div class="layui-row">
	        <form class="layui-form layui-col-md12 x-so">
				<input class="layui-input" placeholder="上传开始日" name="starTime" id="start">
	          	<input class="layui-input" placeholder="上传截止日" name="endTime" id="end">
	          	<div class="layui-input-inline">
	            	<select name="pstatus">
	              		<option>所有商品</option>
	              		<option>上架中</option>
	              		<option>已下架</option>
	            	</select>
	          	</div>
	          	<input type="text" name="proTitle"  placeholder="请输入商品标题" autocomplete="off" class="layui-input">
	          	<button class="layui-btn"  lay-submit="" lay-filter="sreach" type="button"><i class="layui-icon">&#xe615;</i></button>
		        <button class="layui-btn layui-btn-danger" onclick="delAll()" type="button"><i class="layui-icon"></i>批量删除</button>
		        <button class="layui-btn" onclick="x_admin_show('添加用户','${path}/product/productaddpage.jhtml')" type="button"><i class="layui-icon"></i>添加</button>
		        <input type="hidden" name="pageIndex" value="${pageIndex}"/>
		        <input type="hidden" name="pageSize" value="${pageSize}"/>
			</form>
		</div>
		<table id="demo" lay-filter="test"></table>
	</div>
	<script type="text/html" id="barDemo">
  		<a class="layui-btn layui-btn-xs" lay-event="edit">查看</a>
  		<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
	</script>

<script type="text/javascript" src="${path}/res/layui/layui.js" charset="utf-8"></script>
<script>
layui.use('table', function(){
	var table = layui.table;
	  //第一个实例
	table.render({
		elem: '#demo'
	    ,height: 'full-20'
	    ,url: '${path}/product/getProductlist.jhtml' //数据接口
	    ,limits:[15,20,25,30]
	    ,limit:15
	    ,cols: [[ //表头
			{type:'checkbox'},
	      	{field: 'proTitle', title: '商品标题', width:380 }
	      	,{field:'proPrice', title:'商品原价', width:100, edit: 'text',sort: true}
	      	,{field:'proDiscountPrice', title:'商品售价', width:100, edit: 'text',sort: true}
	      	,{field:'proSellNum', title:'已售数量', width:100, edit: 'text',sort: true}
	      	,{field:'proColor', title:'颜色', width:200, edit: 'text'}
	      	,{field:'proSize', title:'尺码', width:150, edit: 'text'}
	      	,{field:'proEventEndTime', title:'结束时间', width:150, edit: 'text',sort: true}
	      	,{field:'proStatus', title:'商品状态', width:100, edit: 'text'}
	      	,{field:'bannerDesc', title:'按钮描述', width:150, edit: 'text'}
	      	,{fixed: 'right', title:'操作', toolbar: '#barDemo', width:150}
		]]
	    ,page: true //开启分页
	  });
	});
</script>

</body>
</html>